D_ARMV7L_LIBMSLOG_LIBS :=`pkg-config --libs libmslog_armv7l`
D_ARMV7L_LIBMSLOG_INCLUDES :=`pkg-config --cflags libmslog_armv7l`
D_ARMV7L_LIBMSCOMMON_LIBS :=`pkg-config --libs libmscommon_armv7l`
D_ARMV7L_LIBMSCOMMON_INCLUDES :=`pkg-config --cflags libmscommon_armv7l`
D_ARMV7L_LIBMSPROTOCOL_LIBS :=`pkg-config --libs libmsprotocol_armv7l`
D_ARMV7L_LIBMSPROTOCOL_INCLUDES :=`pkg-config --cflags libmsprotocol_armv7l`
C_ARMV7L_INCLUDE=${D_BASEAPI_FLAGS} -Isrc ${D_ARMV7L_LIBMSLOG_INCLUDES} ${D_ARMV7L_LIBMSCOMMON_INCLUDES} ${D_ARMV7L_LIBMSPROTOCOL_INCLUDES}
C_ARMV7L_LIBS=${D_ARMV7L_LIBMSLOG_LIBS} ${D_ARMV7L_LIBMSCOMMON_LIBS} ${D_AARMV7L_LIBMSPROTOCOL_LIBS}

libmsdrm_armv7l_PATH=/home/sugao/H2_toolchain/toolchain/4.9.3
libmsdrm_armv7l_CC=${libmsdrm_armv7l_PATH}/bin/arm-cortexa9-linux-gnueabihf-gcc
libmsdrm_armv7l_SRC=${C_SRC}
libmsdrm_armv7l_CFLAGS=${C_ARMV7L_INCLUDE} ${C_ARMV7L_LIBS} ${CFLAGS_SHARE} 

armv7l:libmsdrm_armv7l install_armv7l

libmsdrm_armv7l: 
	mkdir -p $(OUT_LIB)
	mkdir -p $(OUT_INCLUDE)
	cp -fr src/*.h $(OUT_INCLUDE)
	$($@_CC)  $($@_SRC)  $($@_CFLAGS)  -o $(OUT_LIB)/$(PROGRAM_NAME).so 
	
install_armv7l: 
	mkdir -p  ${prefix_armv7l}/lib/ 
	mkdir -p  ${prefix_armv7l}/include/   
	mkdir -p  ${prefix_armv7l}/lib/pkgconfig/ 
	cp -fr $(OUT_LIB)/$(PROGRAM_NAME).so		${prefix_armv7l}/lib/     
	cp -fr $(OUT_INCLUDE)				${prefix_armv7l}/include/	     
	cp -fr platform/$(PROGRAM_NAME)_armv7l.pc	${prefix_armv7l}/lib/pkgconfig/
	
uninstall_armv7l:
	rm -fr ${prefix_armv7l}/lib/$(PROGRAM_NAME).so 
	rm -fr ${prefix_armv7l}/include/$(PROGRAM_NAME)
	rm -fr ${prefix_armv7l}/lib/pkgconfig/$(PROGRAM_NAME)_armv7l.pc
